{template "header.html"}


<form action="" class="form-horizontal" method="post" name="myform" id="myform">
    {$form}
    <div class="portlet bordered light myfbody">
        <div class="portlet-title tabbable-line">
            <ul class="nav nav-tabs" style="float:left;">
                <li class="{if $page==0}active{/if}">
                    <a href="#tab_0" data-toggle="tab" onclick="$('#dr_page').val('0')"> <i class="fa fa-cog"></i> {dr_lang('邀请注册')} </a>
                </li>

            </ul>
        </div>
        <div class="portlet-body">
            <div class="tab-content">

                <div class="tab-pane {if $page==0}active{/if}" id="tab_0">
                    <div class="form-body">

                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('功能开关')}</label>
                            <div class="col-md-9">
                                <input type="checkbox" name="data[open]" value="1" {if $data['open']}checked{/if} data-on-text="{dr_lang('开启')}" data-off-text="{dr_lang('关闭')}" data-on-color="success" data-off-color="danger" class="make-switch" data-size="small">
                                <span class="help-block">{dr_lang('控制全站的邀请注册开关')}</span>
                            </div>
                        </div>



                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('权限设置')}</label>
                            <div class="col-md-9">
                                <div class="table-scrollable">
                                    <table class="fc-cat-table table table-striped table-bordered  table-checkable dataTable">
                                        <thead>
                                        <tr class="heading">
                                            <th width="200" style="height: 40px"></th>
                                            <th width="100">{dr_lang('启用')}</th>
                                            <th width="140">{dr_lang('赠送%s', SITE_SCORE)}</th>
                                            <th width="140">{dr_lang('赠送%s', SITE_EXPERIENCE)}</th>
                                            <th width="140">{dr_lang('充值返现比例')}</th>
                                            <th colspan="99"></th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        {loop $ci->member_cache['group'] $i $t}
                                        <tr class="odd gradeX">

                                            <td >{$t.name}</td>
                                            <td style="vertical-align: top">
                                                <label class="mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline" style="top: -7px;">
                                                    <input type="checkbox" class="checkboxes" {if in_array($i, (array)$data[groupid])} checked {/if} name="data[groupid][]" value="{$i}" />
                                                    <span></span>
                                                </label>
                                            </td>

                                            <td><input type="text" class="form-control" name="data[score][{$i}]" value="{$data[score][$i]}" placeholder=""></td>
                                            <td><input type="text" class="form-control" name="data[exp][{$i}]" value="{$data[exp][$i]}" placeholder=""></td>
                                            <td>
                                                <div class="input-inline input-medium">
                                                    <div class="input-group">
                                                        <input type="text"  name="data[czfx][{$i}]" value="{$data[czfx][$i]}" class="form-control" placeholder="">
                                                        <span class="input-group-addon">
                                                                %
                                                            </span></div>
                                                </div>
                                            </td>

                                            <td colspan="99" >

                                            </td>
                                        </tr>
                                        {/loop}
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('规则说明')}</label>
                            <div class="col-md-9">
                                <p class="help-block">{dr_lang('推荐一个用户成功注册后，获取的赠送奖励')}</p>
                                <p class="help-block">{dr_lang('充值返现只针对用户中心充值功能，不包含在线付款购物')}</p>
                                <p class="help-block">{dr_lang('当用户所属多个用户组时，按最大充值返现比例值优先计算')}</p>
                            </div>
                        </div>





                    </div>
                </div>



            </div>
        </div>
    </div>

    <div class="portlet-body form myfooter">
        <div class="form-actions text-center">
            <button type="button" onclick="dr_ajax_submit('{dr_now_url()}&page='+$('#dr_page').val(), 'myform', '2000')" class="btn green"> <i class="fa fa-save"></i> {dr_lang('保存')}</button>
        </div>
    </div>
</form>
{template "footer.html"}